import React from 'react';
import ToolButton from './ToolButton.jsx';

class Toolbox extends React.Component{
  static propTypes: {
    zoomOut: PropTypes.func.isRequired,
    zoomIn: PropTypes.func.isRequired,
    label: PropTypes.number.isRequired,
    addPoint: PropTypes.func.isRequired,
    addRegion: PropTypes.func.isRequired,
    panMap: PropTypes.func.isRequired,
    measure: PropTypes.func.isRequired
  }
  
  render() {
    return (
      <div className="toolbox">
        <ToolButton styleName="add-point" label="标点" clickHandler={this.props.addPoint} />
        <ToolButton styleName="add-region" label="标面" clickHandler={this.props.addRegion} />
        <ToolButton styleName="pan-map" label="平移" clickHandler={this.props.panMap} />
        <ToolButton styleName="measure" label="测距" clickHandler={this.props.measure} />
      </div>
    );
  }
}; 

export default Toolbox;





